package ch.jamme.conf.def;

import ch.jamme.conf.*;

/**
 * Defines a strategy to how a field name should be translated in the corresponding name marshalled into the xml
 * and vice versa. It can be useful to make the produced XML more readable allowing to use a naming convention 
 * that better matches the names of a specific domain. It is also possible to use it when the name of a given field 
 * get changed after a refactor, in order to not lose the backward compatibility of an XML produced before the refactor itself.
 * This defualt implementation class actually just leaves the name unchanged in both directions
 * @author Mario Fusco
 */
public class DefaultFieldNamingStrategy implements FieldNamingStrategy {

	public String translate(Class<?> containingClass, String fieldName, boolean toXml) {
		return fieldName;
	}
}
